package com.linln.modules.system.domain;

import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.util.Date;
import java.sql.Timestamp;
import java.util.Objects;

@Entity
@Table(name = "Patient_Personal_Situation", schema = "dbo", catalog = "WQR")
@EntityListeners(AuditingEntityListener.class)
public class PatientPersonalSituationEntity {
    private Integer id;
    private String zyh;
    private String grs;
    private String jtcys;
    private String ywjzs;
    private String jttbzhbrs;
    private String jthbcyyhzgx;
    @CreatedDate
    private Date createDate;
    private String bah;
    private String jzs;
    private Date cyrq;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id", nullable = false)
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Basic
    @Column(name = "zyh", nullable = true, length = 20)
    public String getZyh() {
        return zyh;
    }

    public void setZyh(String zyh) {
        this.zyh = zyh;
    }

    @Basic
    @Column(name = "grs", nullable = true, length = 2000)
    public String getGrs() {
        return grs;
    }

    public void setGrs(String grs) {
        this.grs = grs;
    }

    @Basic
    @Column(name = "jtcys", nullable = true)
    public String getJtcys() {
        return jtcys;
    }

    public void setJtcys(String jtcys) {
        this.jtcys = jtcys;
    }

    @Basic
    @Column(name = "ywjzs", nullable = true, length = 4)
    public String getYwjzs() {
        return ywjzs;
    }

    public void setYwjzs(String ywjzs) {
        this.ywjzs = ywjzs;
    }

    @Basic
    @Column(name = "jttbzhbrs", nullable = true)
    public String getJttbzhbrs() {
        return jttbzhbrs;
    }

    public void setJttbzhbrs(String jttbzhbrs) {
        this.jttbzhbrs = jttbzhbrs;
    }

    @Basic
    @Column(name = "jthbcyyhzgx", nullable = true, length = 50)
    public String getJthbcyyhzgx() {
        return jthbcyyhzgx;
    }

    public void setJthbcyyhzgx(String jthbcyyhzgx) {
        this.jthbcyyhzgx = jthbcyyhzgx;
    }

    @Basic
    @Column(name = "createDate", nullable = true)
    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    @Basic
    @Column(name = "jzs", nullable = true, length = 2000)
    public String getJzs() {
        return jzs;
    }

    public void setJzs(String jzs) {
        this.jzs = jzs;
    }

    @Basic
    @Column(name = "cyrq", nullable = true)
    public Date getCyrq() {
        return cyrq;
    }

    public void setCyrq(Date cyrq) {
        this.cyrq = cyrq;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        PatientPersonalSituationEntity that = (PatientPersonalSituationEntity) o;
        return id == that.id && Objects.equals(zyh, that.zyh) && Objects.equals(grs, that.grs) && Objects.equals(jtcys, that.jtcys) && Objects.equals(ywjzs, that.ywjzs) && Objects.equals(jttbzhbrs, that.jttbzhbrs) && Objects.equals(jthbcyyhzgx, that.jthbcyyhzgx) && Objects.equals(createDate, that.createDate)&& Objects.equals(jzs, that.jzs);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, zyh, grs, jtcys, ywjzs, jttbzhbrs, jthbcyyhzgx, createDate,jzs);
    }

    @Basic
    @Column(name = "bah", nullable = false, length = 20)
    public String getBah() {
        return bah;
    }

    public void setBah(String bah) {
        this.bah = bah;
    }
}
